package com.wangyadong.hobby.schedule.jobtask.classload.chapter2;

/**
 * <p>
 *
 * @author <714037465@qq.com>
 * @since 2018/10/3010:16
 **/
public class BootClassLoader
{

    public static void main(String[] args) throws ClassNotFoundException {
        System.out.println(System.getProperty("sun.boot.class.path"));
        System.out.println(System.getProperty("java.ext.dirs"));
        System.out.println("================================");

        Class<?> klass = Class.forName("com.wangyadong.hobby.schedule.jobtask.classload.chapter2.SimpleObject");
        System.out.println(klass.getClassLoader());
        System.out.println(klass.getClassLoader().getParent());
        System.out.println(klass.getClassLoader().getParent().getParent());

        System.out.println("================================");
        Class<?> clazz = Class.forName("java.lang.String");
        System.out.println(clazz);
        System.out.println(clazz.getClassLoader());
    }
}
